package day05;

/*
 * Author: JacksonCoder
 * FileName: InheritanceDemo
 * Version: 1.0.0
 * Date: 2025/4/12
 */
class Animal{
    public void makeSound(){
        System.out.println("Animal sound");
    }
}

class Dog extends Animal{
    public void makeSound(){
        System.out.println("Dog sound");
    }
}

class Cat extends Animal{

}


public class InheritanceDemo {

    public static void main(String[] args) {
        Dog dog = new Dog();
        dog.makeSound();

        Cat cat = new Cat();
        cat.makeSound();

    }

}
